#!/bin/csh -f
# script to make a file '.export' in a series of directories
# this file contains a list of files to be copied to the export directory
# for soft linked files the reference is used, instead of the link file
# (to be used in conjunction with script 'export')

cd $aquaroot
#foreach x ( . data doc exmpls extras lib scripts procheck )
#foreach x ( . data doc exmpls extras lib scripts ) # All but server
foreach x ( . data doc exmpls extras \
            sub sub/include sub/ sub/include sub/lib sub/sublib  sub/subsys\
            scripts html cgi server server/img )

    cd $aquaroot/$x
    \ls -l | \
	$aquaroot/tools/prepexp.nawk -v "dir=$aquaroot/$x" | \
	grep -v old | grep -v test | grep -v orig > .export
    echo "created $aquaroot/$x/.export"
end
cd $aquaroot/src
\ls -l *.[ch] makefile genh exth.f | \
    $aquaroot/tools/prepexp.nawk -v "dir=$aquaroot/src" | \
    grep -v old  | grep -v test | grep -v orig > .export
echo "created $aquaroot/src/.export"
